﻿<cfcomponent displayname="Company" hint="Company" extends="Model">

	<cffunction name="init" access="public" hint="public" displayname="init">
		
		<cfscript>
			
			// association
			hasMany("organizations");
			hasMany("grades");
			hasMany("employees");
			
			
			// validation
			validatesPresenceOf(property="companyname", message="Require Company Name");
			validatesUniquenessOf(property="companyname", message="Company already exists");
			
			return this;
			
		</cfscript>
		
	</cffunction> 
	
</cfcomponent>